import req from '@/utils/request'
import type {
  getSongListsRes,
  GetSongListsDetailType,
} from './model/getSongListsModel'
export const getSongListsApi = (categoryId: number) => {
  return req.get<any, getSongListsRes>('/getSongLists', {
    params: {
      categoryId,
    },
  })
}

// 获取歌单详情
export const getSongListsDetailApi = (id: string) => {
  return req.get<any, GetSongListsDetailType>(
    `/getSongListDetail?disstid=${id}`
  )
}

// 根据mid获取歌曲播放地址
export const getMusicPlayApi = (id: string) => {
  return req.get(`/getMusicPlay?songmid=${id}`)
}
